home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_08_04 / 8n04119a < prev    next >
Text File  |  1990-03-18  |  549b  |  24 lines

  1. ***************
  2. ** Listing 4 **
  3. ***************
  4.  
  5. /*
  6.  
  7.   fork_start()    -- Start the forked routine
  8.  
  9.   This routine is used to call the forked routine.  It
  10.   passes the four bytes to the target routine and then
  11.   resumes the previous task, which should always be the
  12.   fork queue.                        */
  13.  
  14. void fork_start()
  15.   {
  16.   /* Call the routine, passing the long parameter and the
  17.      address of the working TSS.            */
  18.  
  19.   (*current_routine)(current_param, &fdummy_tcb);
  20.  
  21.   /* Task switch back to the fork queue task. */
  22.   resume_last();
  23.   }
  24.